package org.springonrails.util;

public class StringUtils 
{
	public static boolean isEmpty(String value)
	{
		return (value==null || value.trim().length()==0);
	}
	
	public static String matchEmptyReplaceWithNull(String value)
	{
		return (isEmpty(value))?null:value;
	}
	
	public static String matchNullReplaceWithEmpty(String value)
	{
		return (isEmpty(value))?"":value;
	}
}
